/* 基础样式设置 */
:root {
    --primary-color: #1890ff;
    --warning-color: #faad14;
    --success-color: #52c41a;
    --info-color: #1890ff;
    --text-color: #002B49;
    --text-secondary: #666;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 布局调整 */
.row {
    margin: 0 -0.75rem;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

.col-md-3, .col-md-4, .col-md-8 {
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.col-md-3 {
    flex: 0 0 25%;
    max-width: 25%;
}

.col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

.col-md-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
}

/* 统计卡片样式 */
.stat-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    height: 100%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-card .icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-card .label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 图表卡片样式 */
.card {
    background: white;
    border: none;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
    background-color: #fff;
}

.chart-container canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
}

/* 评分统计样式 */
.rating-stats {
    padding: 0.5rem 0;
}

.rating-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.rating-item:last-child {
    margin-bottom: 0;
}

.rating-stats .stars {
    width: 50px;
    color: var(--warning-color);
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
}

.rating-stats .progress {
    flex: 1;
    height: 8px;
    margin: 0 12px;
    background-color: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.rating-stats .progress-bar {
    background-color: var(--warning-color);
    transition: width 0.3s ease;
}

.rating-stats .count {
    min-width: 30px;
    text-align: right;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 加载和错误状态 */
.chart-loading, .chart-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 0.75rem 1.25rem;
    border-radius: 4px;
    background: rgba(255,255,255,0.98);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-size: 0.9rem;
    z-index: 100;
    display: none;
}

.chart-loading {
    color: #1890ff;
}

.chart-error {
    color: #ff4d4f;
    background-color: #fff2f0;
    border: 1px solid #ffccc7;
    white-space: nowrap;
}

/* 表格样式 */
.table {
    width: 100%;
    margin-bottom: 0;
}

.table th {
    background-color: #fafafa;
    border-bottom: 1px solid #f0f0f0;
    padding: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
}

.table td {
    padding: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* 按钮样式 */
.btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #40a9ff;
}

.btn-info {
    background-color: #13c2c2;
    color: white;
}

.btn-info:hover {
    background-color: #36cfc9;
}

/* 刷新按钮 */
.btn-refresh {
    float: right;
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    color: white;
    background-color: var(--primary-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-refresh:hover {
    background-color: #40a9ff;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .col-md-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .col-md-4, .col-md-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .col-md-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .chart-container {
        height: 300px;
    }
}

.stats-card {
    background: #fff;
    border-radius: 0.25rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 0 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
}

.stats-card .icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.stats-card .title {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.stats-card .value {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0;
}

.stats-card .trend {
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.trend.up {
    color: #28a745;
}

.trend.down {
    color: #dc3545;
}

.chart-card {
    background: #fff;
    border-radius: 0.25rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 0 15px rgba(0,0,0,0.05);
}

.chart-card .title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #495057;
}

.table-card {
    background: #fff;
    border-radius: 0.25rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 0 15px rgba(0,0,0,0.05);
}

.table-card .title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #495057;
}

.table-responsive {
    margin: 0 -1.5rem;
    padding: 0 1.5rem;
}

.table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: #495057;
}

.table td {
    vertical-align: middle;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.success {
    background: #d4edda;
    color: #155724;
}

.status-badge.warning {
    background: #fff3cd;
    color: #856404;
}

.status-badge.danger {
    background: #f8d7da;
    color: #721c24;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    font-size: 1rem;
}

.search-box {
    position: relative;
    margin-bottom: 1rem;
}

.search-box .form-control {
    padding-left: 2.5rem;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.pagination {
    margin-bottom: 0;
}

.page-link {
    padding: 0.5rem 0.75rem;
    margin-left: 0.25rem;
    border-radius: 0.25rem;
}

.filter-section {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

.filter-section .form-group {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .stats-card {
        margin-bottom: 1rem;
    }
    
    .chart-card {
        margin-bottom: 1rem;
    }
    
    .table-responsive {
        margin: 0 -1rem;
        padding: 0 1rem;
    }
} 